package com.atguigu.locks;

import java.util.concurrent.TimeUnit;

public class Phone {
    public synchronized void sendEmail(){
        try{
            TimeUnit.SECONDS.sleep(3);
        }catch(Exception e){
            e.printStackTrace();
        }
        System.out.println("Email");
    }
    public synchronized  void sendSMS(){
        System.out.println("SMS");
    }
    public void hello(){
        System.out.println("hello");
    }
}
